﻿
Imports osi.root.utils
Imports osi.root.formation

Public Module _auto_updating_resolver
    Private ReadOnly default_ithreadpool As ithreadpool
    Private ReadOnly p As weak_pointer(Of ithreadpool)

    Sub New()
        default_ithreadpool = managed_threadpool.global
        p = resolver.auto_updating_resolve(Of ithreadpool)()
    End Sub

    Public Function resolve_ithreadpool() As ithreadpool
        Dim o As ithreadpool = Nothing
        Return If(p.get(o), o, default_ithreadpool)
    End Function
End Module
